3.841 \(\int \sqrt {-1+x} x^2 \sqrt {1+x} \, dx\)

Optimal. Leaf size=45 \[ \frac {1}{4} (x-1)^{3/2} x (x+1)^{3/2}+\frac {1}{8} \sqrt {x-1} x \sqrt {x+1}-\frac {1}{8} \cosh ^{-1}(x) \]

[Out]

1/4*(-1+x)^(3/2)*x*(1+x)^(3/2)-1/8*arccosh(x)+1/8*x*(-1+x)^(1/2)*(1+x)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {90, 38, 52} \[ \frac {1}{4} (x-1)^{3/2} x (x+1)^{3/2}+\frac {1}{8} \sqrt {x-1} x \sqrt {x+1}-\frac {1}{8} \cosh ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[-1 + x]*x^2*Sqrt[1 + x],x]

[Out]

(Sqrt[-1 + x]*x*Sqrt[1 + x])/8 + ((-1 + x)^(3/2)*x*(1 + x)^(3/2))/4 - ArcCosh[x]/8

Rule 38

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(x*(a + b*x)^m*(c + d*x)^m)/(2*m + 1)
, x] + Dist[(2*a*c*m)/(2*m + 1), Int[(a + b*x)^(m - 1)*(c + d*x)^(m - 1), x], x] /; FreeQ[{a, b, c, d}, x] &&
EqQ[b*c + a*d, 0] && IGtQ[m + 1/2, 0]

Rule 52

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ArcCosh[(b*x)/a]/b, x] /; FreeQ[{a,
 b, c, d}, x] && EqQ[a + c, 0] && EqQ[b - d, 0] && GtQ[a, 0]

Rule 90

Int[((a_.) + (b_.)*(x_))^2*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(a + b*
x)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 3)), x] + Dist[1/(d*f*(n + p + 3)), Int[(c + d*x)^n*(e +
 f*x)^p*Simp[a^2*d*f*(n + p + 3) - b*(b*c*e + a*(d*e*(n + 1) + c*f*(p + 1))) + b*(a*d*f*(n + p + 4) - b*(d*e*(
n + 2) + c*f*(p + 2)))*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 3, 0]

Rubi steps

\begin {align*} \int \sqrt {-1+x} x^2 \sqrt {1+x} \, dx &=\frac {1}{4} (-1+x)^{3/2} x (1+x)^{3/2}+\frac {1}{4} \int \sqrt {-1+x} \sqrt {1+x} \, dx\\ &=\frac {1}{8} \sqrt {-1+x} x \sqrt {1+x}+\frac {1}{4} (-1+x)^{3/2} x (1+x)^{3/2}-\frac {1}{8} \int \frac {1}{\sqrt {-1+x} \sqrt {1+x}} \, dx\\ &=\frac {1}{8} \sqrt {-1+x} x \sqrt {1+x}+\frac {1}{4} (-1+x)^{3/2} x (1+x)^{3/2}-\frac {1}{8} \cosh ^{-1}(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 63, normalized size = 1.40 \[ \frac {x \sqrt {x+1} \left (2 x^3-2 x^2-x+1\right )+2 \sqrt {1-x} \sin ^{-1}\left (\frac {\sqrt {1-x}}{\sqrt {2}}\right )}{8 \sqrt {x-1}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[-1 + x]*x^2*Sqrt[1 + x],x]

[Out]

(x*Sqrt[1 + x]*(1 - x - 2*x^2 + 2*x^3) + 2*Sqrt[1 - x]*ArcSin[Sqrt[1 - x]/Sqrt[2]])/(8*Sqrt[-1 + x])

________________________________________________________________________________________

fricas [A]  time = 1.22, size = 40, normalized size = 0.89 \[ \frac {1}{8} \, {\left (2 \, x^{3} - x\right )} \sqrt {x + 1} \sqrt {x - 1} + \frac {1}{8} \, \log \left (\sqrt {x + 1} \sqrt {x - 1} - x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(-1+x)^(1/2)*(1+x)^(1/2),x, algorithm="fricas")

[Out]

1/8*(2*x^3 - x)*sqrt(x + 1)*sqrt(x - 1) + 1/8*log(sqrt(x + 1)*sqrt(x - 1) - x)

________________________________________________________________________________________

giac [B]  time = 1.29, size = 70, normalized size = 1.56 \[ \frac {1}{24} \, {\left ({\left (2 \, {\left (3 \, x - 10\right )} {\left (x + 1\right )} + 43\right )} {\left (x + 1\right )} - 39\right )} \sqrt {x + 1} \sqrt {x - 1} + \frac {1}{6} \, {\left ({\left (2 \, x - 5\right )} {\left (x + 1\right )} + 9\right )} \sqrt {x + 1} \sqrt {x - 1} + \frac {1}{4} \, \log \left (\sqrt {x + 1} - \sqrt {x - 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(-1+x)^(1/2)*(1+x)^(1/2),x, algorithm="giac")

[Out]

1/24*((2*(3*x - 10)*(x + 1) + 43)*(x + 1) - 39)*sqrt(x + 1)*sqrt(x - 1) + 1/6*((2*x - 5)*(x + 1) + 9)*sqrt(x +
 1)*sqrt(x - 1) + 1/4*log(sqrt(x + 1) - sqrt(x - 1))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 52, normalized size = 1.16 \[ -\frac {\sqrt {x -1}\, \sqrt {x +1}\, \left (-2 \sqrt {x^{2}-1}\, x^{3}+\sqrt {x^{2}-1}\, x +\ln \left (x +\sqrt {x^{2}-1}\right )\right )}{8 \sqrt {x^{2}-1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(x-1)^(1/2)*(x+1)^(1/2),x)

[Out]

-1/8*(x-1)^(1/2)*(x+1)^(1/2)*(-2*x^3*(x^2-1)^(1/2)+(x^2-1)^(1/2)*x+ln(x+(x^2-1)^(1/2)))/(x^2-1)^(1/2)

________________________________________________________________________________________

maxima [A]  time = 0.47, size = 37, normalized size = 0.82 \[ \frac {1}{4} \, {\left (x^{2} - 1\right )}^{\frac {3}{2}} x + \frac {1}{8} \, \sqrt {x^{2} - 1} x - \frac {1}{8} \, \log \left (2 \, x + 2 \, \sqrt {x^{2} - 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(-1+x)^(1/2)*(1+x)^(1/2),x, algorithm="maxima")

[Out]

1/4*(x^2 - 1)^(3/2)*x + 1/8*sqrt(x^2 - 1)*x - 1/8*log(2*x + 2*sqrt(x^2 - 1))

________________________________________________________________________________________

mupad [B]  time = 7.55, size = 362, normalized size = 8.04 \[ -\frac {\mathrm {atanh}\left (\frac {\sqrt {x-1}-\mathrm {i}}{\sqrt {x+1}-1}\right )}{2}+\frac {\frac {35\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^3}{2\,{\left (\sqrt {x+1}-1\right )}^3}+\frac {273\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^5}{2\,{\left (\sqrt {x+1}-1\right )}^5}+\frac {715\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^7}{2\,{\left (\sqrt {x+1}-1\right )}^7}+\frac {715\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^9}{2\,{\left (\sqrt {x+1}-1\right )}^9}+\frac {273\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^{11}}{2\,{\left (\sqrt {x+1}-1\right )}^{11}}+\frac {35\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^{13}}{2\,{\left (\sqrt {x+1}-1\right )}^{13}}+\frac {{\left (\sqrt {x-1}-\mathrm {i}\right )}^{15}}{2\,{\left (\sqrt {x+1}-1\right )}^{15}}+\frac {\sqrt {x-1}-\mathrm {i}}{2\,\left (\sqrt {x+1}-1\right )}}{1+\frac {28\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {x+1}-1\right )}^4}-\frac {56\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^6}{{\left (\sqrt {x+1}-1\right )}^6}+\frac {70\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^8}{{\left (\sqrt {x+1}-1\right )}^8}-\frac {56\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^{10}}{{\left (\sqrt {x+1}-1\right )}^{10}}+\frac {28\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^{12}}{{\left (\sqrt {x+1}-1\right )}^{12}}-\frac {8\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^{14}}{{\left (\sqrt {x+1}-1\right )}^{14}}+\frac {{\left (\sqrt {x-1}-\mathrm {i}\right )}^{16}}{{\left (\sqrt {x+1}-1\right )}^{16}}-\frac {8\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(x - 1)^(1/2)*(x + 1)^(1/2),x)

[Out]

((35*((x - 1)^(1/2) - 1i)^3)/(2*((x + 1)^(1/2) - 1)^3) + (273*((x - 1)^(1/2) - 1i)^5)/(2*((x + 1)^(1/2) - 1)^5
) + (715*((x - 1)^(1/2) - 1i)^7)/(2*((x + 1)^(1/2) - 1)^7) + (715*((x - 1)^(1/2) - 1i)^9)/(2*((x + 1)^(1/2) -
1)^9) + (273*((x - 1)^(1/2) - 1i)^11)/(2*((x + 1)^(1/2) - 1)^11) + (35*((x - 1)^(1/2) - 1i)^13)/(2*((x + 1)^(1
/2) - 1)^13) + ((x - 1)^(1/2) - 1i)^15/(2*((x + 1)^(1/2) - 1)^15) + ((x - 1)^(1/2) - 1i)/(2*((x + 1)^(1/2) - 1
)))/((28*((x - 1)^(1/2) - 1i)^4)/((x + 1)^(1/2) - 1)^4 - (8*((x - 1)^(1/2) - 1i)^2)/((x + 1)^(1/2) - 1)^2 - (5
6*((x - 1)^(1/2) - 1i)^6)/((x + 1)^(1/2) - 1)^6 + (70*((x - 1)^(1/2) - 1i)^8)/((x + 1)^(1/2) - 1)^8 - (56*((x
- 1)^(1/2) - 1i)^10)/((x + 1)^(1/2) - 1)^10 + (28*((x - 1)^(1/2) - 1i)^12)/((x + 1)^(1/2) - 1)^12 - (8*((x - 1
)^(1/2) - 1i)^14)/((x + 1)^(1/2) - 1)^14 + ((x - 1)^(1/2) - 1i)^16/((x + 1)^(1/2) - 1)^16 + 1) - atanh(((x - 1
)^(1/2) - 1i)/((x + 1)^(1/2) - 1))/2

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{2} \sqrt {x - 1} \sqrt {x + 1}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(-1+x)**(1/2)*(1+x)**(1/2),x)

[Out]

Integral(x**2*sqrt(x - 1)*sqrt(x + 1), x)

________________________________________________________________________________________